import java.awt.*;
/*
import java.applet.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
*/
class FrameEvent extends Frame{
	Panel p01,p02,p03;
	Label L1,L2;
	Button btn01,btn02,btn03;
	boolean flag=false;
	
	public FrameEvent(String str)
	{
		//컴포넌트 생성 
		setLayout(new BorderLayout());
		p01 = new Panel(); //패널은 컴포넌트 놓을 판
		p02 = new Panel();
		p03 = new Panel();
		
		p01.setBackground(new Color(45,169,60));
		p02.setBackground(new Color(255,255,0));
		
		L1 = new Label("이곳에 내용이 표시됨");
		btn01 = new Button("버튼1");
		btn02 = new Button("버튼2");
		btn03 = new Button("Off");
		
		btn01.setBackground(new Color(0,0,120));
		btn01.setForeground(new Color(255,255,255));
		
		btn02.setBackground(new Color(120,0,0));
		btn02.setForeground(new Color(255,255,255));
		
		btn03.setBackground(new Color(184,143,175));
		btn03.setForeground(new Color(255,255,255));
		//컴포넌트를 패널에 배치
		p01.add(L1);
		p02.add(btn01);
		p02.add(btn02);
		p02.add(btn03);
		p03.add(new Button("1"));
		p03.add(new Button("2"));
		p03.add(new Button("3"));
		p03.add(new Button("4"));
		
		
		//패널을 프레임에 배치
		add(p01, BorderLayout.NORTH);
		add(p02, BorderLayout.CENTER);
		add(p03,BorderLayout.SOUTH);
		
		pack();
		this.setTitle(str); //윈도우 이름설정
		this.setSize(400,400); //프레임 크기지정
		this.setVisible(true); //프레임 보여주기	
	}
}
public class ex_7_1_1 {
	public static void main(String[] args){
		FrameEvent t = new FrameEvent("수은");
		t.setBackground(new Color(0,255,0));
	}
}
/*
class FrameEvent extends Frame implements WindowListener, ActionListener{
	Panel p01;
	Label dis;
	Button btn01,
}
*/

